#include "stdafx.h"
#include "HttpServerMainWindow.h"
#include "HttpServer.h"

HttpServerMainWindow::HttpServerMainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
    this->setWindowTitle(tr("HttpServer"));

    m_pHttpServer = new HttpServer(this);

    QMenu* fileMenu = this->menuBar()->addMenu(tr("File"));
    fileMenu->addAction(tr("Start"), this, [this]() {m_pHttpServer->start(12345); });
    fileMenu->addAction(tr("Stop"), this, [this]() {m_pHttpServer->stop(); });
}

HttpServerMainWindow::~HttpServerMainWindow()
{}
